<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加转义字符来使用引号</title>
</head>

<body>
    <p id="demo"></p>
    <script>
        var x = 'It\'s alright';
        var y = "He is called \"Johnny\"";
        document.getElementById("demo").innerHTML = x + "<br>" + y; 
    </script>
</body>

</html>